ShowTable of Contents
Overview
The OSGI console can assist with development investigation as well as with troubleshooting runtime errors in the field. Since the support team regularly makes use of the OSGI console, it's worth becoming familiar with basic commands.
Starting the OSGI console with Lotus Expeditor
When using the Lotus Expeditor Client, append -console to the Expeditor Client shortcut. For example, C:\XPD621\rcp\rcplauncher.exe -console.
If using Lotus Notes 8, append -RPARAMS -console. For example, C:\notes\notes.exe -RPARAMS -console.
When launching either, the OSGI console window will display in addition to the client.
Eclipse developers may already be familiar with the OSGI console. It's often used in the IDE, but the same commands listed below can be used within the IDE as well.
Using the OSGI console
Commands can be input to the platform by typin the command next to the osgi> prompt. If you do not see the prompt simply press enter. For a complete list of commands available, type ? and then press enter. The following sections describe helpful commands, but the list is by no means exhaustive. The list is designed to get you acquinted with the OSGI console and describe some of the more frequent, helpful commands.
Platform Crash or Hang
Should a problem be encountered while running the Expeditor Client such as a platform hang or crash, the following commands provide useful data when conducting a postmortem investigation.
- dump heap generates a JVM heap dump useful when analyzing heap memory usage or memory leaks
- dump threads generates a javacore which can be used to analyze the stack trace of various threads; it's often useful to run dump threads several times and compare threads over time
See
IBM Thread and Monitor Dump Analyzer for Java
for analyzing output from the above command. Additionally, the location of dump output may be redirected by editing the rcpinstall.properties file.
env.set.IBM_JAVACOREDIR=${rcp.data}/logs
env.set.IBM_COREDIR=${rcp.data}/logs
env.set.IBM_HEAPDUMPDIR=${rcp.data}/logs
Bundle Status
When trying to isolate why a particular feature may be failing, it's often necessary to understand the bundle's (plugin's) state: is it installed, is it started, or has it failed to start? The OSGI console generally accepts either the bundle's symbolic name or the bundle ID.
ss
start
stop
diag
bundle
- ss or short status list matching bundles and their state
- start starts a bundle
- stop stops the bundle
- diag determines if the bundle has unresolved dependencies which could lead to runtime problems or an inability to use the bundle at runtime bundle displays a verbose set of information related to exported packages, dependencies, etc
Example
ss com.ibm.rcp.sync
ss sync
start com.ibm.rcp.syncui.schedule
start 606
diag com.ibm.rcp.syncui.schedule
bundle com.ibm.rcp.syncui.schedule
Adusting Log Levels Dynamically
To limit trace output or enable trace output on the fly, use the following command.
- setlogrlev dynamically adjusts log output provide the logger ID (bundle's symbolic name normally) and a level (FINEST, FINER, FINE)
Example
setlogrlev com.ibm.rcp.ui.launcher FINEST
You can adjust the trace level using FINEST, FINER, FINE, INFO, WARNING, CONFIG with lowering levels of detail respectively. If using the above trace, click the Open button in the client to output trace.